/*
 * caso_write_8.c
 *
 *  Created on: Oct 27, 2009
 *      Author: ivansalles
 *
 *      Descritor Invalido
 */
#include <pcb.h>
#include <fs.h>
#include <errno.h>
#include <ftable.h>
#include <stdio.h>

PCB pcb;

int atualizar_bloco();

int carrega_bloco_no_buffer();

int main(){


	int i = 0;
	char buffer[BLOCK_SIZE];
	pcb.pid = 1;
	pcb.user = 1;
	pcb.group = 1;
	pcb.current_dir = 1;

	for(i = 1; i < 20; i++){
		pcb.descriptors[i].usado = 0;
		pcb.descriptors[i].buffer_block = 0;
		pcb.descriptors[i].buffer_changed = 0;
		pcb.descriptors[i].fpos = 0;
		pcb.descriptors[i].mode = 0;
		pcb.descriptors[i].ptr_fentry = 0;
	}

	i = write(25,&buffer,1024,0);

	printf("retorno: %d, errno: %d \n\n", i, errno);


	return 0;
}

int carrega_bloco_no_buffer(int end_bloco, void* ptr_buffer){

	return 0 ;


}

int atualizar_bloco(int end_bloco, void* bloco){
	return 0;
}

